<#include "../common/tags.ftl"/>
<!DOCTYPE html>
<html>

<head>
    <title>代码生成</title>
    <#include "../common/meta.ftl"/>
</head>

<body>
<div class="layui-row" style="padding-top: 20px;">
    <div class="layui-col-md7">
        <form class="layui-form" lay-filter="lig-saveform">
            <div class="layui-form-item">
                <label class="layui-form-label ligui-form-item-required">生成路径</label>
                <div class="layui-input-block">
                    <input type="text" name="roleName" lay-verify="required" autocomplete="off" class="layui-input"
                           placeholder="生成路径" value=''>
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">角色编码</label>
                <div class="layui-input-block">
                    <input type="text" name="roleCode" autocomplete="off"
                           class="layui-input" placeholder="请输入角色编码" value="">
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">备注</label>
                <div class="layui-input-block">
                    <input type="text" name="remark" autocomplete="off"
                           class="layui-input" placeholder="请输入备注信息" value="">
                </div>
            </div>
            <div class="layui-form-item">
                <div class="ligui-layer-btn" style="text-align:left;padding:10px 105px;pointer-events:auto;">
                    <a class="ligui-layer-btn0 ligui-save" lay-submit="" lay-filter="lig-save">保 存</a>
                    <a class="ligui-layer-btn1 ligui-cancel">取 消</a>
                </div>
            </div>
        </form>
    </div>
    <div class="layui-col-md5"></div>
</div>
<#include "../common/script.ftl"/>
<script>
    layui.use(['jquery', 'ligutil'], function () {
        var $ = layui.jquery
                , ligutil = layui.ligutil;

        $('#generate').click(function () {
            ligutil.ajaxpost({
                url: ctx + '/gen/code/generate',
                data: ligutil.form2JSON(".lig-saveform"),
                success: function (result) {
                    console.info(result);
                }
            });
        });
    });
</script>
</body>

</html>